package com.test.decotator;

public class Decorator implements Component{

    private Component component;
    //形参为抽象构件,实参为具体的构件
    public Decorator(Component component){
        this.component = component;
    }
    @Override
    public void operation() {
        //继承基础的功能
        component.operation();
    }
}
